/*
package org.yl.db_core.web.controller;

import org.yl.db_core.base.BaseDao;
import org.yl.db_core.model.YlUserTestModel;
import org.yl.db_core.utils.GSONUtil;
import org.yl.db_core.utils.constant.SqlConstant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

*/
/**
 * @Description: UserTestController
 * @Author: YL
 * @CreateDate: 2018/11/10 14:36
 * @Version: 1.0
 *//*

@RestController
@RequestMapping("/")
public class UserTestController {

    private final static Logger logger = LoggerFactory.getLogger(UserTestController.class);

    @Autowired
    private BaseDao baseDao;

    @RequestMapping("/queryUserTest")
    public List<YlUserTestModel> queryUserTest() {
        //List<YlUserTestModel> list = baseDao.queryByList(new YlUserTestModel(), SqlConstant.SELECT_LIST, new BeanPropertyRowMapper(YlUserTestModel.class));
        List<YlUserTestModel> list = baseDao.queryByList(new YlUserTestModel(), SqlConstant.SELECT_LIST);
        logger.info("list:" + GSONUtil.getGson().toJson(list));
        return list;
    }

    @RequestMapping("/queryUserTestId")
    public YlUserTestModel queryUserTestId() {
        YlUserTestModel model = new YlUserTestModel();
        model.setId(4);
        //YlUserTestModel list = (YlUserTestModel) baseDao.queryById(model, SqlConstant.SELECT_ID, new BeanPropertyRowMapper(YlUserTestModel.class));
        YlUserTestModel list = (YlUserTestModel) baseDao.queryById(model, SqlConstant.SELECT_ID);
        logger.info("list:" + GSONUtil.getGson().toJson(list));
        return list;
    }

    @RequestMapping("/insertUserTest")
    public Integer insertUserTest() {
        YlUserTestModel model = new YlUserTestModel();
        model.setName("test0001");
        model.setAddress("s看到v比佛滅");
        model.setIs_remove("1");
        model.setPwd("23rfdvbfd");
        model.setRemark("阿三v都不放過");
        //int result = baseDao.saveOrUpdateOrDelete(model, SqlConstant.INSERT);
        int result = baseDao.saveOrUpdateOrDeleteforJdbc(model, SqlConstant.INSERT);
        logger.info(String.valueOf(result));
        return result;
    }

    @RequestMapping("/updateUserTest")
    public Integer updateUserTest() {
        YlUserTestModel model = new YlUserTestModel();
        model.setId(5);
        model.setName("awew222");
        model.setAddress("344bgbg");
        model.setIs_remove("1");
        model.setRemark("vsbeaRZSNFFF");
        //int result = baseDao.saveOrUpdateOrDelete(model, SqlConstant.UPDATE);
        int result = baseDao.saveOrUpdateOrDeleteforJdbc(model, SqlConstant.UPDATE);
        logger.info(String.valueOf(result));
        return result;
    }

    @RequestMapping("/deleteUserTest")
    public Integer deleteUserTest() {
        YlUserTestModel model = new YlUserTestModel();
        model.setId(5);
        //int result = baseDao.saveOrUpdateOrDelete(model, SqlConstant.DELETE);
        int result = baseDao.saveOrUpdateOrDeleteforJdbc(model, SqlConstant.DELETE);
        logger.info(String.valueOf(result));
        return result;
    }

}
*/
